<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/finance/cw_jj_yszk/cwJJYszk.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/finance/cw_jj_yszk/cwJJYszk.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'cw_jj_yszk_id',
                footer: "Foots",
                cnName: '应收账款-佳景',
                name: 'cw_jj_yszk/cwJJYszk',
                url: "/cwJJYszk/",
                sortName: "createdate"
            });
            const editFormFields = ref({"duedate":"","trackname":"","category":"","beginyearnum":"","endyearreceivable":"","customer":"","monthreceivable":"","isoverdue":"","iscushion":"","cushiontype":"","collectionpolicy":"","accountperiod":"","problem":"","measure":"","receivabledate":"","invoicingdate":"","personliable":"","aging1":"","aging2":"","aging3":"","aging4":"","aging5":"","aging6":"","returnedmoney1":"","returnedmoney2":"","returnedmoney3":"","receivables":"","project":"","classificationnature":"","overdueclassification":"","classificationperiodnature":"","isinvoiced":"","anomalousproperty":"","billingperiod":"","collectionperiod":"","estimateincomedate":"","overduedays":"","responsibledepartment":"","departmentperson":"","projectmanager":""});
            const editFormOptions = ref([[{"title":"应收日期","field":"duedate","type":"month"},
                               {"dataKey":"cw_yszk_trackname_all","data":[],"title":"赛道","field":"trackname","type":"select"}],
                              [{"dataKey":"cw_yszg_category","data":[],"title":"分类","field":"category","type":"select"},
                               {"title":"年初数","field":"beginyearnum","type":"decimal"}],
                              [{"title":"年末应收","field":"endyearreceivable","type":"decimal"},
                               {"title":"客户","field":"customer","type":"text"}],
                              [{"title":"月应收","field":"monthreceivable","type":"decimal"},
                               {"dataKey":"cw_yszk_isoverdue","data":[],"title":"是否逾期","field":"isoverdue","type":"select"}],
                              [{"dataKey":"cw_yszk_iscushion","data":[],"title":"是否代垫","field":"iscushion","type":"select"},
                               {"title":"代垫类型","field":"cushiontype","type":"text"}],
                              [{"title":"收款政策","field":"collectionpolicy","type":"text"},
                               {"title":"账期","field":"accountperiod","type":"text"}],
                              [{"title":"存在的问题","field":"problem","type":"textarea"},
                               {"title":"措施","field":"measure","type":"textarea"}],
                              [{"title":"应收到期日","field":"receivabledate","type":"date"},
                               {"title":"开票日期","field":"invoicingdate","type":"date"}],
                              [{"title":"责任人","field":"personliable","type":"text"},
                               {"title":"1-3个月","field":"aging1","type":"decimal"}],
                              [{"title":"3-6个月","field":"aging2","type":"decimal"},
                               {"title":"6-12个月","field":"aging3","type":"decimal"}],
                              [{"title":"1-2年","field":"aging4","type":"decimal"},
                               {"title":"2-3年","field":"aging5","type":"decimal"}],
                              [{"title":"3年以上","field":"aging6","type":"decimal"},
                               {"title":"N+1月","field":"returnedmoney1","type":"decimal"}],
                              [{"title":"N+2月","field":"returnedmoney2","type":"decimal"},
                               {"title":"N+3月","field":"returnedmoney3","type":"decimal"}],
                              [{"title":"应收状态","field":"receivables","type":"text"},
                               {"title":"项目","field":"project","type":"text"}],
                              [{"title":"项目性质分类","field":"classificationnature","type":"text"},
                               {"title":"逾期性质性质分类","field":"overdueclassification","type":"text"}],
                              [{"title":"账期性质分类","field":"classificationperiodnature","type":"text"},
                               {"title":"是否已开发票","field":"isinvoiced","type":"text"}],
                              [{"title":"异常性质","field":"anomalousproperty","type":"textarea"},
                               {"title":"开票期限","field":"billingperiod","type":"text"}],
                              [{"title":"回款期限","field":"collectionperiod","type":"text"},
                               {"title":"暂估收入日期","field":"estimateincomedate","type":"text"}],
                              [{"title":"逾期天数","field":"overduedays","type":"text"},
                               {"title":"责任部门","field":"responsibledepartment","type":"text"}],
                              [{"title":"部门负责人","field":"departmentperson","type":"text"},
                               {"title":"项目经理/直接负责人","field":"projectmanager","type":"text"}]]);
            const searchFormFields = ref({"duedate":"","trackname":"","category":"","customer":"","isoverdue":"","iscushion":""});
            const searchFormOptions = ref([[{"title":"应收日期","field":"duedate","type":"month"},{"dataKey":"cw_yszk_trackname_all","data":[],"title":"赛道","field":"trackname","type":"select"},{"dataKey":"cw_yszg_category","data":[],"title":"分类","field":"category","type":"select"}],[{"title":"客户","field":"customer","type":"text"},{"dataKey":"cw_yszk_isoverdue","data":[],"title":"是否逾期","field":"isoverdue","type":"select"},{"dataKey":"cw_yszk_iscushion","data":[],"title":"是否代垫","field":"iscushion","type":"select"}]]);
            const columns = ref([{field:'cw_jj_yszk_id',title:'佳景应收账款表',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'duedate',title:'应收日期',type:'datetime',sort:true,width:150,align:'left',sort:true},
                       {field:'trackname',title:'赛道',type:'string',bind:{ key:'cw_yszk_trackname_all',data:[]},width:220,align:'left'},
                       {field:'category',title:'分类',type:'string',bind:{ key:'cw_yszg_category',data:[]},width:220,align:'left'},
                       {field:'beginyearnum',title:'年初数',type:'decimal',width:110,align:'left'},
                       {field:'endyearreceivable',title:'年末应收',type:'decimal',width:110,align:'left'},
                       {field:'customer',title:'客户',type:'string',width:220,align:'left'},
                       {field:'monthreceivable',title:'月应收',type:'decimal',width:110,align:'left'},
                       {field:'isoverdue',title:'是否逾期',type:'string',bind:{ key:'cw_yszk_isoverdue',data:[]},width:220,align:'left'},
                       {field:'iscushion',title:'是否代垫',type:'string',bind:{ key:'cw_yszk_iscushion',data:[]},width:220,align:'left'},
                       {field:'cushiontype',title:'代垫类型',type:'string',width:220,align:'left'},
                       {field:'collectionpolicy',title:'收款政策',type:'string',width:220,align:'left'},
                       {field:'accountperiod',title:'账期',type:'string',width:220,align:'left'},
                       {field:'problem',title:'存在的问题',type:'string',width:220,align:'left'},
                       {field:'measure',title:'措施',type:'string',width:220,align:'left'},
                       {field:'receivabledate',title:'应收到期日',type:'datetime',width:150,align:'left',sort:true},
                       {field:'invoicingdate',title:'开票日期',type:'datetime',width:150,align:'left',sort:true},
                       {field:'personliable',title:'责任人',type:'string',width:220,align:'left'},
                       {field:'aging1',title:'1-3个月',type:'decimal',width:110,align:'left'},
                       {field:'aging2',title:'3-6个月',type:'decimal',width:110,align:'left'},
                       {field:'aging3',title:'6-12个月',type:'decimal',width:110,align:'left'},
                       {field:'aging4',title:'1-2年',type:'decimal',width:110,align:'left'},
                       {field:'aging5',title:'2-3年',type:'decimal',width:110,align:'left'},
                       {field:'aging6',title:'3年以上',type:'decimal',width:110,align:'left'},
                       {field:'returnedmoney1',title:'N+1月',type:'decimal',width:110,align:'left'},
                       {field:'returnedmoney2',title:'N+2月',type:'decimal',width:110,align:'left'},
                       {field:'returnedmoney3',title:'N+3月',type:'decimal',width:110,align:'left'},
                       {field:'receivables',title:'应收状态',type:'string',width:220,align:'left'},
                       {field:'project',title:'项目',type:'string',width:220,align:'left'},
                       {field:'classificationnature',title:'项目性质分类',type:'string',width:220,align:'left'},
                       {field:'overdueclassification',title:'逾期性质性质分类',type:'string',width:220,align:'left'},
                       {field:'classificationperiodnature',title:'账期性质分类',type:'string',width:220,align:'left'},
                       {field:'isinvoiced',title:'是否已开发票',type:'string',width:220,align:'left'},
                       {field:'anomalousproperty',title:'异常性质',type:'string',width:220,align:'left'},
                       {field:'billingperiod',title:'开票期限',type:'string',width:220,align:'left'},
                       {field:'collectionperiod',title:'回款期限',type:'string',width:220,align:'left'},
                       {field:'estimateincomedate',title:'暂估收入日期',type:'string',width:220,align:'left'},
                       {field:'overduedays',title:'逾期天数',type:'string',width:220,align:'left'},
                       {field:'responsibledepartment',title:'责任部门',type:'string',width:220,align:'left'},
                       {field:'departmentperson',title:'部门负责人',type:'string',width:220,align:'left'},
                       {field:'projectmanager',title:'项目经理/直接负责人',type:'string',width:220,align:'left'},
                       {field:'Creator',title:'创建人',type:'string',width:130,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'Modifier',title:'修改人',type:'string',width:130,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,align:'left',sort:true}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
